package com.yxinsur.imc.business.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxinsur.imc.common.core.domain.BaseImcEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yxinsur.imc.common.annotation.Excel;
import com.yxinsur.imc.common.core.domain.BaseEntity;

/**
 * 代理人身份角色对象 imc_broker_role
 *
 * @author imc
 * @date 2021-03-19
 */
@Data
@TableName("imc_broker_role")
public class ImcBrokerRole extends BaseImcEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    private String id;

    /** 代理人id */
    @Excel(name = "代理人id")
    private Long brokerId;

    /** 代理人角色编码 */
    @Excel(name = "代理人角色编码")
    private Long roleId;

    /** 代理人身份角色生效日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "代理人身份角色生效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date brokerRoleStart;

    /** 代理人身份角色截止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "代理人身份角色截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date brokerRoleEnd;



    /** $column.columnComment */
    @Excel(name = "备注")
    private String remark;

    /** 租户id,一个租户id唯一对一个机构id（默认机构id为根节点id暨法人机构） */
    @Excel(name = "租户id,一个租户id唯一对一个机构id", readConverterExp = "默=认机构id为根节点id暨法人机构")
    private Long tenantId;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("brokerId", getBrokerId())
            .append("roleId", getRoleId())
            .append("brokerRoleStart", getBrokerRoleStart())
            .append("brokerRoleEnd", getBrokerRoleEnd())
            .append("createId", getCreateId())
            .append("createTime", getCreateTime())
            .append("updateId", getUpdateId())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("tenantId", getTenantId())
            .toString();
    }
}
